\(\int \frac {\cos (c+d x)}{a-b \sin ^4(c+d x)} \, dx\) [407]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (verified)
   Fricas [C] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 22, antiderivative size = 71 \[ \int \frac {\cos (c+d x)}{a-b \sin ^4(c+d x)} \, dx=\frac {\arctan \left (\frac {\sqrt [4]{b} \sin (c+d x)}{\sqrt [4]{a}}\right )}{2 a^{3/4} \sqrt [4]{b} d}+\frac {\text {arctanh}\left (\frac {\sqrt [4]{b} \sin (c+d x)}{\sqrt [4]{a}}\right )}{2 a^{3/4} \sqrt [4]{b} d} \]

[Out]

1/2*arctan(b^(1/4)*sin(d*x+c)/a^(1/4))/a^(3/4)/b^(1/4)/d+1/2*arctanh(b^(1/4)*sin(d*x+c)/a^(1/4))/a^(3/4)/b^(1/
4)/d

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {3302, 218, 214, 211} \[ \int \frac {\cos (c+d x)}{a-b \sin ^4(c+d x)} \, dx=\frac {\arctan \left (\frac {\sqrt [4]{b} \sin (c+d x)}{\sqrt [4]{a}}\right )}{2 a^{3/4} \sqrt [4]{b} d}+\frac {\text {arctanh}\left (\frac {\sqrt [4]{b} \sin (c+d x)}{\sqrt [4]{a}}\right )}{2 a^{3/4} \sqrt [4]{b} d} \]

[In]

Int[Cos[c + d*x]/(a - b*Sin[c + d*x]^4),x]

[Out]

ArcTan[(b^(1/4)*Sin[c + d*x])/a^(1/4)]/(2*a^(3/4)*b^(1/4)*d) + ArcTanh[(b^(1/4)*Sin[c + d*x])/a^(1/4)]/(2*a^(3
/4)*b^(1/4)*d)

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 218

Int[((a_) + (b_.)*(x_)^4)^(-1), x_Symbol] :> With[{r = Numerator[Rt[-a/b, 2]], s = Denominator[Rt[-a/b, 2]]},
Dist[r/(2*a), Int[1/(r - s*x^2), x], x] + Dist[r/(2*a), Int[1/(r + s*x^2), x], x]] /; FreeQ[{a, b}, x] &&  !Gt
Q[a/b, 0]

Rule 3302

Int[cos[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*((c_.)*sin[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With
[{ff = FreeFactors[Sin[e + f*x], x]}, Dist[ff/f, Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*(a + b*(c*ff*x)^n)^p, x]
, x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && IntegerQ[(m - 1)/2] && (EqQ[n, 4] || GtQ[m, 0
] || IGtQ[p, 0] || IntegersQ[m, p])

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {1}{a-b x^4} \, dx,x,\sin (c+d x)\right )}{d} \\ & = \frac {\text {Subst}\left (\int \frac {1}{\sqrt {a}-\sqrt {b} x^2} \, dx,x,\sin (c+d x)\right )}{2 \sqrt {a} d}+\frac {\text {Subst}\left (\int \frac {1}{\sqrt {a}+\sqrt {b} x^2} \, dx,x,\sin (c+d x)\right )}{2 \sqrt {a} d} \\ & = \frac {\arctan \left (\frac {\sqrt [4]{b} \sin (c+d x)}{\sqrt [4]{a}}\right )}{2 a^{3/4} \sqrt [4]{b} d}+\frac {\text {arctanh}\left (\frac {\sqrt [4]{b} \sin (c+d x)}{\sqrt [4]{a}}\right )}{2 a^{3/4} \sqrt [4]{b} d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.76 \[ \int \frac {\cos (c+d x)}{a-b \sin ^4(c+d x)} \, dx=\frac {\arctan \left (\frac {\sqrt [4]{b} \sin (c+d x)}{\sqrt [4]{a}}\right )+\text {arctanh}\left (\frac {\sqrt [4]{b} \sin (c+d x)}{\sqrt [4]{a}}\right )}{2 a^{3/4} \sqrt [4]{b} d} \]

[In]

Integrate[Cos[c + d*x]/(a - b*Sin[c + d*x]^4),x]

[Out]

(ArcTan[(b^(1/4)*Sin[c + d*x])/a^(1/4)] + ArcTanh[(b^(1/4)*Sin[c + d*x])/a^(1/4)])/(2*a^(3/4)*b^(1/4)*d)

Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 0.59 (sec) , antiderivative size = 48, normalized size of antiderivative = 0.68

method result size
risch \(\munderset {\textit {\_R} =\operatorname {RootOf}\left (256 a^{3} b \,d^{4} \textit {\_Z}^{4}-1\right )}{\sum }\textit {\_R} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+8 i a d \textit {\_R} \,{\mathrm e}^{i \left (d x +c \right )}-1\right )\) \(48\)
derivativedivides \(\frac {\left (\frac {a}{b}\right )^{\frac {1}{4}} \left (\ln \left (\frac {\sin \left (d x +c \right )+\left (\frac {a}{b}\right )^{\frac {1}{4}}}{\sin \left (d x +c \right )-\left (\frac {a}{b}\right )^{\frac {1}{4}}}\right )+2 \arctan \left (\frac {\sin \left (d x +c \right )}{\left (\frac {a}{b}\right )^{\frac {1}{4}}}\right )\right )}{4 d a}\) \(68\)
default \(\frac {\left (\frac {a}{b}\right )^{\frac {1}{4}} \left (\ln \left (\frac {\sin \left (d x +c \right )+\left (\frac {a}{b}\right )^{\frac {1}{4}}}{\sin \left (d x +c \right )-\left (\frac {a}{b}\right )^{\frac {1}{4}}}\right )+2 \arctan \left (\frac {\sin \left (d x +c \right )}{\left (\frac {a}{b}\right )^{\frac {1}{4}}}\right )\right )}{4 d a}\) \(68\)

[In]

int(cos(d*x+c)/(a-b*sin(d*x+c)^4),x,method=_RETURNVERBOSE)

[Out]

sum(_R*ln(exp(2*I*(d*x+c))+8*I*a*d*_R*exp(I*(d*x+c))-1),_R=RootOf(256*_Z^4*a^3*b*d^4-1))

Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.33 (sec) , antiderivative size = 161, normalized size of antiderivative = 2.27 \[ \int \frac {\cos (c+d x)}{a-b \sin ^4(c+d x)} \, dx=\frac {1}{4} \, \left (\frac {1}{a^{3} b d^{4}}\right )^{\frac {1}{4}} \log \left (\frac {1}{2} \, a d \left (\frac {1}{a^{3} b d^{4}}\right )^{\frac {1}{4}} + \frac {1}{2} \, \sin \left (d x + c\right )\right ) - \frac {1}{4} \, \left (\frac {1}{a^{3} b d^{4}}\right )^{\frac {1}{4}} \log \left (\frac {1}{2} \, a d \left (\frac {1}{a^{3} b d^{4}}\right )^{\frac {1}{4}} - \frac {1}{2} \, \sin \left (d x + c\right )\right ) + \frac {1}{4} i \, \left (\frac {1}{a^{3} b d^{4}}\right )^{\frac {1}{4}} \log \left (\frac {1}{2} i \, a d \left (\frac {1}{a^{3} b d^{4}}\right )^{\frac {1}{4}} + \frac {1}{2} \, \sin \left (d x + c\right )\right ) - \frac {1}{4} i \, \left (\frac {1}{a^{3} b d^{4}}\right )^{\frac {1}{4}} \log \left (\frac {1}{2} i \, a d \left (\frac {1}{a^{3} b d^{4}}\right )^{\frac {1}{4}} - \frac {1}{2} \, \sin \left (d x + c\right )\right ) \]

[In]

integrate(cos(d*x+c)/(a-b*sin(d*x+c)^4),x, algorithm="fricas")

[Out]

1/4*(1/(a^3*b*d^4))^(1/4)*log(1/2*a*d*(1/(a^3*b*d^4))^(1/4) + 1/2*sin(d*x + c)) - 1/4*(1/(a^3*b*d^4))^(1/4)*lo
g(1/2*a*d*(1/(a^3*b*d^4))^(1/4) - 1/2*sin(d*x + c)) + 1/4*I*(1/(a^3*b*d^4))^(1/4)*log(1/2*I*a*d*(1/(a^3*b*d^4)
)^(1/4) + 1/2*sin(d*x + c)) - 1/4*I*(1/(a^3*b*d^4))^(1/4)*log(1/2*I*a*d*(1/(a^3*b*d^4))^(1/4) - 1/2*sin(d*x +
c))

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 129 vs. \(2 (63) = 126\).

Time = 2.57 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.82 \[ \int \frac {\cos (c+d x)}{a-b \sin ^4(c+d x)} \, dx=\begin {cases} \frac {\tilde {\infty } x \cos {\left (c \right )}}{\sin ^{4}{\left (c \right )}} & \text {for}\: a = 0 \wedge b = 0 \wedge d = 0 \\\frac {1}{3 b d \sin ^{3}{\left (c + d x \right )}} & \text {for}\: a = 0 \\\frac {\sin {\left (c + d x \right )}}{a d} & \text {for}\: b = 0 \\\frac {x \cos {\left (c \right )}}{a - b \sin ^{4}{\left (c \right )}} & \text {for}\: d = 0 \\- \frac {\sqrt [4]{\frac {a}{b}} \log {\left (- \sqrt [4]{\frac {a}{b}} + \sin {\left (c + d x \right )} \right )}}{4 a d} + \frac {\sqrt [4]{\frac {a}{b}} \log {\left (\sqrt [4]{\frac {a}{b}} + \sin {\left (c + d x \right )} \right )}}{4 a d} + \frac {\sqrt [4]{\frac {a}{b}} \operatorname {atan}{\left (\frac {\sin {\left (c + d x \right )}}{\sqrt [4]{\frac {a}{b}}} \right )}}{2 a d} & \text {otherwise} \end {cases} \]

[In]

integrate(cos(d*x+c)/(a-b*sin(d*x+c)**4),x)

[Out]

Piecewise((zoo*x*cos(c)/sin(c)**4, Eq(a, 0) & Eq(b, 0) & Eq(d, 0)), (1/(3*b*d*sin(c + d*x)**3), Eq(a, 0)), (si
n(c + d*x)/(a*d), Eq(b, 0)), (x*cos(c)/(a - b*sin(c)**4), Eq(d, 0)), (-(a/b)**(1/4)*log(-(a/b)**(1/4) + sin(c
+ d*x))/(4*a*d) + (a/b)**(1/4)*log((a/b)**(1/4) + sin(c + d*x))/(4*a*d) + (a/b)**(1/4)*atan(sin(c + d*x)/(a/b)
**(1/4))/(2*a*d), True))

Maxima [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.41 \[ \int \frac {\cos (c+d x)}{a-b \sin ^4(c+d x)} \, dx=\frac {\frac {2 \, \arctan \left (\frac {\sqrt {b} \sin \left (d x + c\right )}{\sqrt {\sqrt {a} \sqrt {b}}}\right )}{\sqrt {a} \sqrt {\sqrt {a} \sqrt {b}}} - \frac {\log \left (\frac {\sqrt {b} \sin \left (d x + c\right ) - \sqrt {\sqrt {a} \sqrt {b}}}{\sqrt {b} \sin \left (d x + c\right ) + \sqrt {\sqrt {a} \sqrt {b}}}\right )}{\sqrt {a} \sqrt {\sqrt {a} \sqrt {b}}}}{4 \, d} \]

[In]

integrate(cos(d*x+c)/(a-b*sin(d*x+c)^4),x, algorithm="maxima")

[Out]

1/4*(2*arctan(sqrt(b)*sin(d*x + c)/sqrt(sqrt(a)*sqrt(b)))/(sqrt(a)*sqrt(sqrt(a)*sqrt(b))) - log((sqrt(b)*sin(d
*x + c) - sqrt(sqrt(a)*sqrt(b)))/(sqrt(b)*sin(d*x + c) + sqrt(sqrt(a)*sqrt(b))))/(sqrt(a)*sqrt(sqrt(a)*sqrt(b)
)))/d

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 224 vs. \(2 (51) = 102\).

Time = 0.85 (sec) , antiderivative size = 224, normalized size of antiderivative = 3.15 \[ \int \frac {\cos (c+d x)}{a-b \sin ^4(c+d x)} \, dx=\frac {\frac {2 \, \sqrt {2} \left (-a b^{3}\right )^{\frac {1}{4}} \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2} \left (-\frac {a}{b}\right )^{\frac {1}{4}} + 2 \, \sin \left (d x + c\right )\right )}}{2 \, \left (-\frac {a}{b}\right )^{\frac {1}{4}}}\right )}{a b} + \frac {2 \, \sqrt {2} \left (-a b^{3}\right )^{\frac {1}{4}} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {2} \left (-\frac {a}{b}\right )^{\frac {1}{4}} - 2 \, \sin \left (d x + c\right )\right )}}{2 \, \left (-\frac {a}{b}\right )^{\frac {1}{4}}}\right )}{a b} + \frac {\sqrt {2} \left (-a b^{3}\right )^{\frac {1}{4}} \log \left (\sin \left (d x + c\right )^{2} + \sqrt {2} \left (-\frac {a}{b}\right )^{\frac {1}{4}} \sin \left (d x + c\right ) + \sqrt {-\frac {a}{b}}\right )}{a b} - \frac {\sqrt {2} \left (-a b^{3}\right )^{\frac {1}{4}} \log \left (\sin \left (d x + c\right )^{2} - \sqrt {2} \left (-\frac {a}{b}\right )^{\frac {1}{4}} \sin \left (d x + c\right ) + \sqrt {-\frac {a}{b}}\right )}{a b}}{8 \, d} \]

[In]

integrate(cos(d*x+c)/(a-b*sin(d*x+c)^4),x, algorithm="giac")

[Out]

1/8*(2*sqrt(2)*(-a*b^3)^(1/4)*arctan(1/2*sqrt(2)*(sqrt(2)*(-a/b)^(1/4) + 2*sin(d*x + c))/(-a/b)^(1/4))/(a*b) +
 2*sqrt(2)*(-a*b^3)^(1/4)*arctan(-1/2*sqrt(2)*(sqrt(2)*(-a/b)^(1/4) - 2*sin(d*x + c))/(-a/b)^(1/4))/(a*b) + sq
rt(2)*(-a*b^3)^(1/4)*log(sin(d*x + c)^2 + sqrt(2)*(-a/b)^(1/4)*sin(d*x + c) + sqrt(-a/b))/(a*b) - sqrt(2)*(-a*
b^3)^(1/4)*log(sin(d*x + c)^2 - sqrt(2)*(-a/b)^(1/4)*sin(d*x + c) + sqrt(-a/b))/(a*b))/d

Mupad [B] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 40, normalized size of antiderivative = 0.56 \[ \int \frac {\cos (c+d x)}{a-b \sin ^4(c+d x)} \, dx=\frac {\mathrm {atan}\left (\frac {b^{1/4}\,\sin \left (c+d\,x\right )}{a^{1/4}}\right )+\mathrm {atanh}\left (\frac {b^{1/4}\,\sin \left (c+d\,x\right )}{a^{1/4}}\right )}{2\,a^{3/4}\,b^{1/4}\,d} \]

[In]

int(cos(c + d*x)/(a - b*sin(c + d*x)^4),x)

[Out]

(atan((b^(1/4)*sin(c + d*x))/a^(1/4)) + atanh((b^(1/4)*sin(c + d*x))/a^(1/4)))/(2*a^(3/4)*b^(1/4)*d)